home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
shareware
/
fractals
/
apfelkiste
/
apfelkiste1.3
/
includes
/
libraries
/
arpbase.h
next >
Wrap
C/C++ Source or Header
|
1994-11-17
|
48KB
|
1,125 lines
#ifndef LIBRARIES_ARPBASE_H
#define LIBRARIES_ARPBASE_H 1
/*
************************************************************************
* *
* 5/3/89 ARPbase.h by MKSoft from ARPbase.i by SDB *
* *
************************************************************************
* *
* AmigaDOS Resource Project -- Library Include File *
* for Lattice C 5.x or Manx C 3.6 *
* *
************************************************************************
* *
* Copyright (c) 1987/1988/1989 by Scott Ballantyne *
* *
* The arp.library, and related code and files may be freely used *
* by supporters of ARP. Modules in the arp.library may not be *
* extracted for use in independent code, but you are welcome to *
* provide the arp.library with your work and call on it freely. *
* *
* You are equally welcome to add new functions, improve the ones *
* within, or suggest additions. *
* *
* BCPL programs are not welcome to call on the arp.library. *
* The welcome mat is out to all others. *
* *
************************************************************************
* *
* N O T E ! You MUST! have IoErr() defined as LONG to use LastTracker *
* If your compiler has other defines for this, you may wish *
* to remove the prototype for IoErr() from this file. *
* *
************************************************************************
*/
/*
************************************************************************
* First we need to include the Amiga Standard Include files... *
************************************************************************
*/
#ifndef EXEC_TYPES_H
#include <EXEC/Types.h>
#endif EXEC_TYPES_H
#ifndef EXEC_LISTS_H
#include <EXEC/Lists.h>
#endif EXEC_LISTS_H
#ifndef EXEC_ALERTS_H
#include <EXEC/Alerts.h>
#endif EXEC_ALERTS_H
#ifndef EXEC_LIBRARIES_H
#include <EXEC/Libraries.h>
#endif EXEC_LIBRARIES_H
#ifndef EXEC_SEMAPHORES_H
#include <EXEC/Semaphores.h>
#endif EXEC_SEMAPHORES_H
#ifndef LIBRARIES_DOS_H
#include <Libraries/DOS.h>
#endif LIBRARIES_DOS_H
/*
************************************************************************
* Check for MANX/Lattice and define the differences... *
************************************************************************
* At the moment MANX 3.6 does not have prototypes or the *
* wonderful #pragma statements of Lattice 5.0... *
* And, no __stdargs in MANX either... *
************************************************************************
*/
#ifdef AZTEC_C
#define NO_PRAGMAS 1
#define NO_PROTOTYPES 1
#define C_Args
#endif AZTEC_C
#ifdef LATTICE
#define C_Args __stdargs
#endif LATTICE
/*
************************************************************************
* Standard definitions for arp library information *
************************************************************************
*/
#define ArpName "arp.library" /* Name of library... */
#define ArpVersion 39L /* Current version... */
/*
************************************************************************
* The current ARP library node... *
************************************************************************
*/
struct ArpBase {
struct Library LibNode; /* Standard library node */
APTR DosRootNode; /* Copy of dl_Root */
UBYTE Flags; /* See bitdefs below */
UBYTE ESCChar; /* Character to be used for escaping */
LONG ArpReserved1; /* ArpLib's use only!! */
struct Library *EnvBase; /* Dummy library for MANX compatibility*/
struct Library *DosBase; /* Cached DosBase */
struct Library *GfxBase; /* Cached GfxBase */
struct Library *IntuiBase; /* Cached IntuitionBase */
struct MinList ResLists; /* Resource trackers */
struct ResidentProgramNode *ResidentPrgList;/* Resident Programs. */
struct SignalSemaphore ResPrgProtection;/* protection for above */
BPTR SegList; /* Pointer to loaded libcode (a BPTR). */
};
/*
************************************************************************
* The following is here *ONLY* for information and for *
* compatibility with MANX. DO NOT use in new code! *
************************************************************************
*/
#ifdef ARP_PRIVATE
struct EnvBase {
struct Library LibNode; /* Standard library node for linkage */
BYTE *EnvSpace; /* Access only when Forbidden! */
ULONG EnvSize; /* Total allocated mem for EnvSpace */
struct ArpBase *ArpBase; /* Added in V32 for Resource Tracking */
};
#endif ARP_PRIVATE
/*
************************************************************************
* These are used in release 33.4 but not by the library code. *
* Instead, individual programs check for these flags. *
************************************************************************
*/
#define ARPB_WILD_WORLD 0L ; Mixed BCPL/Normal wildcards.
#define ARPB_WILD_BCPL 1L ; Pure BCPL wildcards.
#define ARPF_WILD_WORLD (1L << ARPB_WILD_WORLD)
#define ARPF_WILD_BCPL (1L << ARPB_WILD_BCPL)
/*
************************************************************************
* The alert object is what you use if you really must return an alert *
* to the user. You would normally OR this with another alert number *
* from the alerts.h file. Generally, should be NON deadend alerts. *
* *
* For example, if you can't open ArpLibrary: *
* Alert( (AG_OpenLib|AO_ArpLib), 0L); *
************************************************************************
*/
#define AO_ArpLib 0x00008036L /* Alert object */
/*
************************************************************************
* Alerts that arp.library may return... *
************************************************************************
*/
#define AN_ArpLib 0x03600000L /* Alert number */
#define AN_ArpNoMem 0x03610000L /* No more memory */
#define AN_ArpInputMem 0x03610002L /* No memory for input buffer */
#define AN_ArpNoMakeEnv 0x83610003L /* No memory to make EnvLib */
#define AN_ArpNoDOS 0x83630001L /* Can't open dos.library */
#define AN_ArpNoGfx 0x83630002L /* Can't open graphics.library */
#define AN_ArpNoIntuit 0x83630003L /* Can't open intuition */
#define AN_BadPackBlues 0x83640000L /* Bad packet returned to SendPacket() */
#define AN_Zombie 0x83600003L /* Zombie roaming around system */
#define AN_ArpScattered 0x83600002L /* Scatter loading not allowed for arp */
/*
************************************************************************
* Return codes you can get from calling ARP Assign()... *
************************************************************************
*/
#define ASSIGN_OK 0L /* Everything is cool and groovey */
#define ASSIGN_NODEV 1L /* "Physical" is not valid for assignment */
#define ASSIGN_FATAL 2L /* Something really icky happened */
#define ASSIGN_CANCEL 3L /* Tried to cancel something but it won't cancel */
/*
************************************************************************
* Size of buffer you need if you are going to call ReadLine() *
************************************************************************
*/
#define MaxInputBuf 256L
/*
************************************************************************
* The ARP file requester data structure... *
************************************************************************
*/
struct FileRequester {
BYTE *fr_Hail; /* Hailing text */
BYTE *fr_File; /* Filename array (FCHARS + 1) */
BYTE *fr_Dir; /* Directory array (DSIZE + 1) */
struct Window *fr_Window; /* Window requesting or NULL */
UBYTE fr_FuncFlags; /* Set bitdef's below */
UBYTE fr_Flags2; /* New flags... */
VOID (*fr_Function)(); /* Your function, see bitdef's */
WORD fr_LeftEdge; /* To be used later... */
WORD fr_TopEdge;
};
/*
************************************************************************
* The following are the defines for fr_FuncFlags. These bits tell *
* FileRequest() what your fr_UserFunc is expecting, and what *
* FileRequest() should call it for. *
* *
* You are called like so: *
* fr_Function(Mask,